#ifndef IMAGE_H
#define IMAGE_H


#include "zf_common_headfile.h"

#define jidian_search_line 120
#define search_start_line 120
#define search_end_line 30
#define left_line_right_search 10
#define left_line_left_search 5
#define right_line_left_search 10
#define right_line_right_search 5
#define MID_W 93

extern uint8 img_threshold; 
extern uint8 base_image[MT9V03X_H][MT9V03X_W];
extern uint8 image[MT9V03X_H][MT9V03X_W];
extern uint8 image_threshold;	
extern uint8 left_jidian;
extern uint8 right_jidian;
extern uint8 left_line_list[MT9V03X_H];
extern uint8 right_line_list[MT9V03X_H];
extern uint8 mid_line_list[MT9V03X_H];
extern uint8 final_mid_line; 
extern uint8 last_mid_line;

uint8 Ostu(uint8 index[MT9V03X_H][MT9V03X_W]);
void set_image_twovalues(uint8 value);
void find_jidian(uint8 index[MT9V03X_H][MT9V03X_W]);
void image_deal(uint8 index[MT9V03X_H][MT9V03X_W]);
uint8 find_mid_line_weight(void);


#endif